// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 项目状态类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2024-10-14
 */
public enum ProjectStatusEnum {
    ONGOING(1, "进行中"),
    FINISHED(2, "已完成"),
    PENDING(3, "PENDING"),
    REPEALED(4, "已废止");

    private int value;

    private String name;

    ProjectStatusEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        ProjectStatusEnum arrObj[] = ProjectStatusEnum.values();
        for (ProjectStatusEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
